<!DOCTYPE html>
<html class="no-js" lang="zxx">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="x-ua-compatible" content="ie=edge" />
    <title>Browse Categories - JobGrids Job Portal HTML Template.</title>
    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="shortcut icon" type="image/x-icon" href="assets/images/favicon.svg" />
    <!-- Place favicon.ico in the root directory -->

    <!-- Web Font -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
        rel="stylesheet">

    <!-- ========================= CSS here ========================= -->
    <link rel="stylesheet" href="assets/css/bootstrap.min.css" />
    <link rel="stylesheet" href="assets/css/LineIcons.2.0.css" />
    <link rel="stylesheet" href="assets/css/animate.css" />
    <link rel="stylesheet" href="assets/css/tiny-slider.css" />
    <link rel="stylesheet" href="assets/css/glightbox.min.css" />
    <link rel="stylesheet" href="assets/css/main.css" />
  <!--设置元素隐藏，点击radio注册元素显现-->
  <style>
    .hidden{
        display:none;
    }
  </style>
</head>

<body>
    <!--[if lte IE 9]>
      <p class="browserupgrade">
        You are using an <strong>outdated</strong> browser. Please
        <a href="https://browsehappy.com/">upgrade your browser</a> to improve
        your experience and security.
      </p>
    <![endif]-->

    <div id="loading-area"></div>

    <!-- Start Header Area -->
    <header class="header other-page">
      <div class="navbar-area">
        <div class="container">

          <div class="row align-items-center">

            <div class="col-lg-12">
              <nav class="navbar navbar-expand-lg">
                <a class="navbar-brand logo" href="index.html">
                  <img class="logo1" src="assets/images/logo/logo.svg" alt="Logo" />
                </a>
                <button class="navbar-toggler" type="button" data-toggle="collapse"
                        data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                  <span class="toggler-icon"></span>
                  <span class="toggler-icon"></span>
                  <span class="toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse sub-menu-bar" id="navbarSupportedContent">
                  <ul id="nav" class="navbar-nav ml-auto">
                    <li class="nav-item">
                      <a href="index.html">主页</a>

                    </li>

                    <li class="nav-item">
                        <a  href="browse-jobs.html">职位搜索</a>
                      </li>



                    <li class="nav-item hidden" id="hrmanagejobbarliid"><a href="#">职位管理 </a>
                      <ul class="sub-menu">
                        <li><a href="post-job.html">发布职位</a></li>
                        <li><a href="manage-jobs.html">职位查看与编辑</a></li>
                        <li><a  href="have-manage-resumes.html">已处理申请</a></li>
                        <li><a  href="manage-resumes.html">待处理申请</a></li>

                      </ul>
                    </li>

                    <!-- <li class="nav-item"><a href="#">招聘 </a>
                      <ul class="sub-menu">
                        <li><a href="post-job.html">发布职位</a></li>
                        <li><a href="manage-jobs.html">管理岗位信息</a></li>
                        <li><a href="manage-applications.html">？管理岗位申请</a></li>
                        <li><a href="manage-resumes.html">管理求职申请</a></li>
                        <li><a href="browse-resumes.html">浏览简历</a></li>

                      </ul>
                    </li> -->



                    <li class="nav-item">
                      <a   href="blog-grid-sidebar.html">论坛</a></li>
                    <!-- <li><a href="blog-single.html">论坛详情</a></li> -->
                    <!-- <li><a href="blog-single-sidebar.html">Blog Single Sibebar</a></li> -->
                    </li>

                    <li class="nav-item"><a href="contact.html">联系我们 </a> </li>


                    <li class="nav-item"><a href="#">其他</a>
                      <ul class="sub-menu">
                        <!-- <li><a href="index.html" onclick="logout()">Log Out</a></li> -->
                        <li><a onclick="checkloginuser()">Personal Info</a></li>
                        <li><a href="about-us.html" onclick="addtoken()">about-us</a></li>
                        <li><a href="job-list.html">职位列表</a></li>
                        <li><a href="job-details.html">职位详情</a></li>
                        <li><a href="resume.html">个人信息展示</a></li>
                        <li><a href="privacy-policy.html">用户手册</a></li>
                        <li><a href="faq.html">问题</a></li>
                        <!-- <li><a href="pricing.html">Our Pricing</a></li> -->
                        <li><a href="404.html">404错误</a></li>
                        <li><a href="mail-success.html">成功发出消息</a></li>
                        <li><a href="index-seeker.html">s</a></li>
                        <li><a href="index-hr.html">h</a></li>
                      </ul>
                    </li>



                    <li class="nav-item" id="nouserinforcenterbarid"><a href="#">个人中心</a>

                    </li>
                    <li class="nav-item hidden" id="seekerinforcenterbarliid"><a href="#">个人中心</a>
                      <ul class="sub-menu">
                        <li><a href="resume.html">简历查看</a></li>
                        <li><a href="showseekerinfo.html">个人信息编辑</a></li>
                        <li><a href="add-resume.html">简历编辑</a></li>
                        <li><a href="manage-applications.html">申请进度</a></li>
                        <li><a href="job-alerts.html">消息提醒</a></li>
                        <li><a href="manage-blog.html">管理博客</a></li>
                      </ul>
                    </li>
                    <li class="nav-item hidden " id="hrinforcenterbarliid"><a href="#">个人中心</a>
                      <ul class="sub-menu">
                        <li><a href="showhrinfo.html">信息编辑</a></li>

                        <li><a href="job-alerts.html">消息提醒</a></li>
                        <li><a href="manage-blog.html">管理博客</a></li>
                      </ul>
                    </li>
                    <li class="nav-item login hidden" id="shownamebarliid">

                      <a href="showhrinfo.html" id="shownameid" >
                      </a>
                      <ul class="sub-menu">
                        <li><a href="index.html" onclick="logout()">退出登录</a></li>
                      </ul>
                    </li>
                  </ul>
                </div>
                <!-- navbar collapse -->
                <div class="button " id="loginsignupbarid">
                  <a href="javacript:" data-toggle="modal" data-target="#login" class=" login"><i
                    class="  lni lni-lock-alt " ></i>登录</a>
                  <a href="javacript:" data-toggle="modal" data-target="#signup" class=" btn">注册</a>

                </div>
              </nav>
              <!-- navbar -->
            </div>
          </div>
          <!-- row -->
        </div>
        <!-- container -->
      </div>
      <!-- navbar area -->
    </header>
    <!-- End Header Area -->



    <!-- Start Job Category Area -->
    <section class="job-category section">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="section-title">
                        <span class="wow fadeInDown" data-wow-delay=".2s">Job Category</span>
                        <h2 class="wow fadeInUp" data-wow-delay=".4s">Choose Your Desire Category</h2>
                        <p class="wow fadeInUp" data-wow-delay=".6s">There are many variations of passages of Lorem
                            Ipsum available, but the majority have suffered alteration in some form.</p>
                    </div>
                </div>
            </div>
            <div class="cat-head">
                <div class="row">
                    <div class="col-lg-3 col-md-6 col-12">
                        <a href="browse-jobs.html" class="single-cat wow fadeInUp" data-wow-delay=".2s">
                            <div class="icon">
                                <i class="lni lni-cog"></i>
                            </div>
                            <h3>Technical<br> Support</h3>
                        </a>
                    </div>
                    <div class="col-lg-3 col-md-6 col-12">
                        <a href="browse-jobs.html" class="single-cat wow fadeInUp" data-wow-delay=".4s">
                            <div class="icon">
                                <i class="lni lni-layers"></i>
                            </div>
                            <h3>Business<br> Development</h3>
                        </a>
                    </div>
                    <div class="col-lg-3 col-md-6 col-12">
                        <a href="browse-jobs.html" class="single-cat wow fadeInUp" data-wow-delay=".6s">
                            <div class="icon">
                                <i class="lni lni-home"></i>
                            </div>
                            <h3>Real Estate<br> Business</h3>
                        </a>
                    </div>
                    <div class="col-lg-3 col-md-6 col-12">
                        <a href="browse-jobs.html" class="single-cat wow fadeInUp" data-wow-delay=".8s">
                            <div class="icon">
                                <i class="lni lni-search"></i>
                            </div>
                            <h3>Share Maeket<br> Analysis</h3>
                        </a>
                    </div>
                    <div class="col-lg-3 col-md-6 col-12">
                        <a href="browse-jobs.html" class="single-cat wow fadeInUp" data-wow-delay=".2s">
                            <div class="icon">
                                <i class="lni lni-investment"></i>
                            </div>
                            <h3>Finance & Banking <br> Service</h3>
                        </a>
                    </div>
                    <div class="col-lg-3 col-md-6 col-12">
                        <a href="browse-jobs.html" class="single-cat wow fadeInUp" data-wow-delay=".4s">
                            <div class="icon">
                                <i class="lni lni-cloud-network"></i>
                            </div>
                            <h3>IT & Networing <br> Sevices</h3>
                        </a>
                    </div>
                    <div class="col-lg-3 col-md-6 col-12">
                        <a href="browse-jobs.html" class="single-cat wow fadeInUp" data-wow-delay=".6s">
                            <div class="icon">
                                <i class="lni lni-restaurant"></i>
                            </div>
                            <h3>Restaurant <br> Services</h3>
                        </a>
                    </div>
                    <div class="col-lg-3 col-md-6 col-12">
                        <a href="browse-jobs.html" class="single-cat wow fadeInUp" data-wow-delay=".8s">
                            <div class="icon">
                                <i class="lni lni-fireworks"></i>
                            </div>
                            <h3>Defence & Fire <br> Service</h3>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- /End Job Category Area -->

    <section class="all-categories section">
        <div class="container">
            <h2 class="categories-title">Browse All Categories</h2>
            <div class="row">
                <div class="col-lg-12 col-sm-12 col-xs-12">
                    <h3 class="cat-title">Business <span>(33 Sub Categories)</span></h3>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Accounting & Finance</a></li>
                        <li><a href="browse-jobs.html">Asset Management</a></li>
                        <li><a href="browse-jobs.html">Capital Markets</a></li>
                        <li><a href="browse-jobs.html">Commercial Banking</a></li>
                        <li><a href="browse-jobs.html">Commodities</a></li>
                        <li><a href="browse-jobs.html">Consultiong</a></li>
                        <li><a href="browse-jobs.html">Corporate</a></li>
                        <li><a href="browse-jobs.html">Credit</a></li>
                    </ul>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Debt/Fixed Income</a></li>
                        <li><a href="browse-jobs.html">Derivatives</a></li>
                        <li><a href="browse-jobs.html">Equities</a></li>
                        <li><a href="browse-jobs.html">FX & Money Markets</a></li>
                        <li><a href="browse-jobs.html">Global Custody</a></li>
                        <li><a href="browse-jobs.html">Covernment</a></li>
                        <li><a href="browse-jobs.html">Graduates & Internships</a></li>
                        <li><a href="browse-jobs.html">Hedge Funds</a></li>
                    </ul>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Information Services</a></li>
                        <li><a href="browse-jobs.html">Insurance</a></li>
                        <li><a href="browse-jobs.html">Investment Consulting</a></li>
                        <li><a href="browse-jobs.html">Investment Banking</a></li>
                        <li><a href="browse-jobs.html">Islamic Finance</a></li>
                        <li><a href="browse-jobs.html">Operations</a></li>
                        <li><a href="browse-jobs.html">Private Banking</a></li>
                        <li><a href="browse-jobs.html">Private Equity & Venture Capital</a></li>
                    </ul>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Quantitative Analytics</a></li>
                        <li><a href="browse-jobs.html">Real Estate</a></li>
                        <li><a href="browse-jobs.html">Research</a></li>
                        <li><a href="browse-jobs.html">Retail Banking</a></li>
                        <li><a href="browse-jobs.html">Risk Management</a></li>
                        <li><a href="browse-jobs.html">Trading</a></li>
                    </ul>
                </div>
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <h3 class="cat-title">Science <span>(34 Sub Categories)</span></h3>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Aeronautical Engineering</a></li>
                        <li><a href="browse-jobs.html">Aerospace Engineering</a></li>
                        <li><a href="browse-jobs.html">Algorthm</a></li>
                        <li><a href="browse-jobs.html">Biology</a></li>
                        <li><a href="browse-jobs.html">Broadcast Engineering</a></li>
                        <li><a href="browse-jobs.html">Circuit Design</a></li>
                        <li><a href="browse-jobs.html">Civil Engineering</a></li>
                        <li><a href="browse-jobs.html">Clean Technology</a></li>
                        <li><a href="browse-jobs.html">Construction Monitoring</a></li>
                    </ul>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Climate Sciences</a></li>
                        <li><a href="browse-jobs.html">Cryptography</a></li>
                        <li><a href="browse-jobs.html">Data Mining</a></li>
                        <li><a href="browse-jobs.html">Data Science</a></li>
                        <li><a href="browse-jobs.html">Digital Design</a></li>
                        <li><a href="browse-jobs.html">Drones</a></li>
                        <li><a href="browse-jobs.html">Electrical Engineering</a></li>
                        <li><a href="browse-jobs.html">Electronics</a></li>
                        <li><a href="browse-jobs.html">Engineering</a></li>
                    </ul>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Gelolgy</a></li>
                        <li><a href="browse-jobs.html">Human Science</a></li>
                        <li><a href="browse-jobs.html">Imaging</a></li>
                        <li><a href="browse-jobs.html">Industrial Engineering</a></li>
                        <li><a href="browse-jobs.html">Instrumentation</a></li>
                        <li><a href="browse-jobs.html">Machine Learning</a></li>
                        <li><a href="browse-jobs.html">Mathematics</a></li>
                        <li><a href="browse-jobs.html">Machanical Engineering</a></li>
                        <li><a href="browse-jobs.html">Medical</a></li>
                    </ul>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Nanotechnology</a></li>
                        <li><a href="browse-jobs.html">Natural Language</a></li>
                        <li><a href="browse-jobs.html">Physics</a></li>
                        <li><a href="browse-jobs.html">Quantum</a></li>
                        <li><a href="browse-jobs.html">Remote Sensing</a></li>
                        <li><a href="browse-jobs.html">Robotics</a></li>
                        <li><a href="browse-jobs.html">Statistics</a></li>
                        <li><a href="browse-jobs.html">Wireless</a></li>
                    </ul>
                </div>
                <div class="col-lg-12 col-md-12 col-xs-12">
                    <h3 class="cat-title">Sales & Marketing <span>(21 Sub Categories)</span></h3>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Display Advertising</a></li>
                        <li><a href="browse-jobs.html">Email Marketing</a></li>
                        <li><a href="browse-jobs.html">Lead Generation</a></li>
                        <li><a href="browse-jobs.html">Market &amp; Customer Research</a></li>
                    </ul>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Marketing Strategy</a></li>
                        <li><a href="browse-jobs.html">Public Relations</a></li>
                        <li><a href="browse-jobs.html">Telemarketing &amp; Telesales</a></li>
                        <li><a href="browse-jobs.html">Other - Sales &amp; Marketing</a></li>
                    </ul>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">SEM - Search Engine Marketing</a></li>
                        <li><a href="browse-jobs.html">SEO - Search Engine Optimization</a></li>
                        <li><a href="browse-jobs.html">SMM - Social Media Marketing</a></li>
                    </ul>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-12">
                    <ul>
                        <li><a href="browse-jobs.html">Climate Sciences</a></li>
                        <li><a href="browse-jobs.html">Cryptography</a></li>
                        <li><a href="browse-jobs.html">Data Mining</a></li>
                        <li><a href="browse-jobs.html">Digital Design</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </section>

    <!-- Login Modal -->
    <div class="modal fade form-modal" id="login" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog max-width-px-840 position-relative">
            <button type="button"
                class="circle-32 btn-reset bg-white pos-abs-tr mt-md-n6 mr-lg-n6 focus-reset z-index-supper"
                data-dismiss="modal"><i class="lni lni-close"></i></button>
            <div class="login-modal-main">
                <div class="row no-gutters">
                    <div class="col-12">
                        <div class="row">
                            <div class="heading">
                                <h3>Login From Here</h3>
                                <p>Log in to continue your account <br> and explore new jobs.</p>
                            </div>
                            <div class="social-login">
                                <ul>
                                    <li><a class="linkedin" href="#"><i class="lni lni-linkedin-original"></i> Log in
                                            with LinkedIn</a></li>
                                    <li><a class="google" href="#"><i class="lni lni-google"></i> Log in with
                                            Google</a></li>
                                    <li><a class="facebook" href="#"><i class="lni lni-facebook-original"></i> Log in
                                            with Facebook</a></li>
                                </ul>
                            </div>
                            <div class="or-devider">
                                <span>Or</span>
                            </div>
                            <form action="/">
                                <div class="form-group">
                                    <label for="email" class="label">E-mail</label>
                                    <input type="email" class="form-control" placeholder="example@gmail.com" id="email">
                                </div>
                                <div class="form-group">
                                    <label for="password" class="label">Password</label>
                                    <div class="position-relative">
                                        <input type="password" class="form-control" id="password"
                                            placeholder="Enter password">
                                    </div>
                                </div>
                                <div class="form-group d-flex flex-wrap justify-content-between">
                                    <!-- Default checkbox -->
                                    <div class="form-check">
                                        <input class="form-check-input" type="checkbox" value=""
                                            id="flexCheckDefault" />
                                        <label class="form-check-label" for="flexCheckDefault">Remember password</label>
                                    </div>
                                    <a href="" class="font-size-3 text-dodger line-height-reset">Forget Password</a>
                                </div>
                                <div class="form-group mb-8 button">
                                    <button class="btn ">Log in
                                    </button>
                                </div>
                                <p class="text-center create-new-account">Don’t have an account? <a href="#">Create a free account</a></p>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End Login Modal -->

    <!-- Signup Modal -->
    <div class="modal fade form-modal" id="signup" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog max-width-px-840 position-relative">
            <button type="button"
                class="circle-32 btn-reset bg-white pos-abs-tr mt-md-n6 mr-lg-n6 focus-reset z-index-supper"
                data-dismiss="modal"><i class="lni lni-close"></i></button>
            <div class="login-modal-main">
                <div class="row no-gutters">
                    <div class="col-12">
                        <div class="row">
                            <div class="heading">
                                <h3>Create a free Account <br> Today</h3>
                                <p>Create your account to continue <br> and explore new jobs.</p>
                            </div>
                            <div class="social-login">
                                <ul>
                                    <li><a class="linkedin" href="#"><i class="lni lni-linkedin-original"></i> Import from LinkedIn</a></li>
                                    <li><a class="google" href="#"><i class="lni lni-google"></i> Import from
                                            Google</a></li>
                                    <li><a class="facebook" href="#"><i class="lni lni-facebook-original"></i> Import from Facebook</a></li>
                                </ul>
                            </div>
                            <div class="or-devider">
                                <span>Or</span>
                            </div>
                            <form action="/">
                                <div class="form-group">
                                    <label for="email" class="label">E-mail</label>
                                    <input type="email" class="form-control" placeholder="example@gmail.com">
                                </div>
                                <div class="form-group">
                                    <label for="password" class="label">Password</label>
                                    <div class="position-relative">
                                        <input type="password" class="form-control"
                                            placeholder="Enter password">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="password" class="label">Confirm Password</label>
                                    <div class="position-relative">
                                        <input type="password" class="form-control"
                                            placeholder="Enter password">
                                    </div>
                                </div>
                                <div class="form-group d-flex flex-wrap justify-content-between">
                                    <!-- Default checkbox -->
                                    <div class="form-check">
                                        <input class="form-check-input" type="checkbox" value="">
                                        <label class="form-check-label" for="flexCheckDefault">Agree to the <a
                                                href="#">Terms & Conditions</a></label>
                                    </div>
                                </div>
                                <div class="form-group mb-8 button">
                                    <button class="btn ">Sign Up
                                    </button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End Signup Modal -->

                        <!-- Start Footer Area -->
<footer class="footer">
        <div class="footer-bottom">
            <div class="container">
                <div class="inner">
                    <div class="row">
                        <div class="col-lg-6 col-md-6 col-12">
                            <div class="left">
                                <p><a target="_blank" >软件工程大作业</a></p>
                            </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-12">
                            <div class="right">
                                <ul>
                                    <li><a href="privacy-policy.html">用户手册</a></li>
                                    <li><a href="#">项目文档</a></li>
                                    <li><a href="https://gitee.com/Yuan-Wi/software-engineering-team/tree/master/">gitee</a></li>
                                    <li><a href="contact.html">联系我们</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- End Footer Middle -->
    </footer>
    <!--/ End Footer Area -->

    <!-- ========================= scroll-top ========================= -->
    <a href="#" class="scroll-top btn-hover">
        <i class="lni lni-chevron-up"></i>
    </a>

    <div class="hidden">
      <input  id="logintoken" name="mytoken" value="">
    </div>
    <!-- ========================= JS here ========================= -->
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/wow.min.js"></script>
    <script src="assets/js/tiny-slider.js"></script>
    <script src="assets/js/glightbox.min.js"></script>
    <script src="assets/js/main.js"></script>
    <script src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
    <script type="text/javascript">

      //================注册登录相关
            //像后端传本地浏览器保存的token（当前登录用户）点击首页跳转的页面
      function checkloginuser(){
          //window.location.reload();

        $.ajax({
        url: "http://localhost:8080/mycheckloginuser",
        type: "GET",
        data: {token : window.localStorage.getItem("user")?window.localStorage.getItem("user"):"notoken"},
        success: function(result){
         // alert(result.code);
          if(result.code==200){
            if(result.msg=="hrlogin"){

            location.href="http://localhost/static/html/showhrinfo.html";
            }
            else if(result.msg=="employeelogin"){window.location.href="http://localhost/static/html/showseekerinfo.html";}
          }
          else {
            alert(result.code+result.msg);
            }
        },
        error: function(){
        alert("请刷新重试");
        },
      });

      };
    //其他业务请求从本地浏览器中存的token获取加入请求头

    function logout(){
     window.localStorage.removeItem('user');
     location.href="http://localhost/static/html/index.html";
    };
    var loginuserinfo;//当前登录用户的角色和id
    /*解析token*/
    function sparsetoken(){
    var token;
      $(function(){
      token = window.localStorage.getItem("user");//这可以得到当前登录用户的token
      alert("user="+token);
      alert(window.location.href);
      //data.data.normal_login_token为发送Ajax获取到的token信息
    var strings = token.split(".");//通过split()方法将token转为字符串数组
    //取strings[1]数组中的第二个字符进行解析
    var userinfo = JSON.parse(decodeURIComponent(escape(window.atob(strings[1].replace(/-/g, "+").replace(/_/g, "/")))));
    loginuserinfo = userinfo;//赋给全局变量
    //然后可以拿到解析后的数据，可以console.log()打印下，roleid是在表中的id，loginrole=hrlogin或seekerlogin
    alert(userinfo.roleid+userinfo.loginrole+'userinfo');

      });
    /*  $.ajax({
        url: "http://localhost:8080/myabout",
        type: "GET",
        xhrFields: {
                        withCredentials: true
                    },
        success: function(result){
          alert("成功");
        },
        error: function(){
        alert("失败");
        },
      });*/
    };

//===========最初需要完成下拉框的内容的加载
  $(document).ready(function(){
         /*   alert("新方法");*/
						$.get(
						/*去到url的控制器中处理*/
							"http://localhost:8080/companysignuplist",
							function(data){
							 /* alert(data[0].companyId);*/
								for(var i = 0 ; i < data.length;i++){
									/*创建新的一行*/
									var newRow = "<option value="+data[i].companyId+">"+data[i].companyName+"</option>";
									/*插入新的一行*/
									$("#hrsignupcompanyclass select").append(newRow);
								}


							}
						);
				});
      //===========最初需要完成名字的显示和相关用户导航栏的隐藏
  $(document).ready(function(){
         /*   alert("新方法");*/
						$.ajax({
    url: "http://localhost:8080/mylogingetusername",
    type: "GET",
    data: {token : window.localStorage.getItem("user")?window.localStorage.getItem("user"):"notoken"},
    success: function(result){
     // alert(result.code);
      if(result.code==200){
      alert(result.msg);
      //非登录用户的个人中心bar隐藏，用户名字显示
      document.getElementById("loginsignupbarid").classList.add("hidden");
      document.getElementById("loginsignupbarid").classList.remove("button");

      document.getElementById("nouserinforcenterbarid").classList.add("hidden");
      document.getElementById("shownamebarliid").classList.remove("hidden");

      if(result.data=="seekerlogin"){
      //当前登录用户是seeker
      //hr的bar隐藏，seeker的bar显示
      document.getElementById("hrmanagejobbarliid").classList.add("hidden");
      document.getElementById("hrinforcenterbarliid").classList.add("hidden");

      document.getElementById("seekerinforcenterbarliid").classList.remove("hidden");
      }
      else if(result.data=="hrlogin"){
      //当前登录用户是hr
      //seeker的bar隐藏，hr的bar显示
      document.getElementById("seekerinforcenterbarliid").classList.add("hidden");

      document.getElementById("hrmanagejobbarliid").classList.remove("hidden");
      document.getElementById("hrinforcenterbarliid").classList.remove("hidden");

      }

      document.getElementById('shownameid').textContent = "欢迎"+result.msg+"登录";

      }
      else if(result.code==1){
      //没有用户登录，隐藏用户bar
      document.getElementById("nouserinforcenterbarid").classList.remove("hidden");
      document.getElementById("loginsignupbarid").classList.remove("hidden");
      document.getElementById("loginsignupbarid").classList.add("button");

      document.getElementById("shownamebarliid").classList.add("hidden");
      document.getElementById("seekerinforcenterbarliid").classList.add("hidden");
      document.getElementById("hrmanagejobbarliid").classList.add("hidden");
      document.getElementById("hrinforcenterbarliid").classList.add("hidden");

      }
      else {
      document.getElementById("nouserinforcenterbarid").classList.remove("hidden");
      document.getElementById("loginsignupbarid").classList.remove("hidden");
document.getElementById("loginsignupbarid").classList.add("button");
      document.getElementById("shownamebarliid").classList.add("hidden");
      document.getElementById("seekerinforcenterbarliid").classList.add("hidden");
      document.getElementById("hrmanagejobbarliid").classList.add("hidden");
      document.getElementById("hrinforcenterbarliid").classList.add("hidden");
        alert(result.code+result.msg);
        }
    },
    error: function(){
    alert("请刷新重试");
    },
  });
				});

        var loginrule;
        function getloginroleradioval(value){
         loginrole=value;
        }
      //===========登录角色表单数据传到后台
      function login(){
      //判断当前是否登录
      //if(window.localStorage.getItem("user")){
      //alert("当前此设备已经有登录，如果要重新登录请先退出");
      //}
      //alert("login"+$('#loginform').serialize());
      $.ajax({
        type: "POST",
        dataType: "json",
        url: "http://localhost:8080/mylogin",
        data: $('#loginform').serialize(),
        crossDomain: true, // 发送Ajax时，Request header 中会包含跨域的额外信息，但不会含cookie（作用不明，不会影响请求头的携带）
        xhrFields: {
              withCredentials: true /*发送Ajax时，Request header中会带上 Cookie 信息。*/
                     },
        success: function(result){
          if(result.code==200){
            alert("登录成功");
            let exp = new Date();
            exp.setTime(exp.getTime() + 60 * 60 * 1000); //设置过期时间，1小时过期
            window.localStorage.setItem("user",result.msg,exp.toGMTString());
            document.cookie="usertoken="+result.msg+"; domain=http://localhost; path=http://localhost/frontindex";
            var strings = result.msg.split(".");//通过split()方法将token转为字符串数组
            //取strings[1]数组中的第二个字符进行解析
            var userinfo = JSON.parse(decodeURIComponent(escape(window.atob(strings[1].replace(/-/g, "+").replace(/_/g, "/")))));
            //然后可以拿到解析后的数据，可以console.log()打印下，roleid是在表中的id，loginrole=hrlogin或seekerlogin
            alert("欢迎登录"+userinfo.roleid+userinfo.loginrole);
            //alert("登陆成功后的"+result.msg+"=="+document.cookie);
            $("#login").modal('hide');
            /*清空表单*/
            $('#loginform')[0].reset();
            location.href="http://localhost/static/html/index.html";
          }
          else{
            alert(result.code+result.msg);
          }
        },
        error: function(){
          alert("登录失败");
        },
      });
      };
      var signrole;//注册角色
      //===========表单数据传到后台
      function signup(){
      /*alert("signrole"+signrole);*/
        $.ajax({
          type: "POST",
          dataType: "json",
          url: "http://localhost:8080/"+signrole,
          data: $('#signupform').serialize(),
          success: function(result){
             /* alert(result.code);*/
              if(result.code==200){
               alert("注册成功");
               /*退出模态框*/
               $("#signup").modal('hide');
               /*清空表单*/
               $('#signupform')[0].reset();
                document.getElementById("hrsignupposclass").classList.add("hidden");
                document.getElementById("hrsignupcompanyclass").classList.add("hidden");
                document.getElementById("hrsignuppos").removeAttribute('required');
                document.getElementById("hrsignupcompany").removeAttribute('required');
                 document.getElementById("seekersignemailclass").classList.add("hidden");
                document.getElementById("seekerdateclass").classList.add("hidden");
                document.getElementById("seekeriseduclass").classList.add("hidden");
                document.getElementById("seekersigngenderclass").classList.add("hidden");
                document.getElementById("seekersigngender").removeAttribute('required');
                document.getElementById("seekersignemail").removeAttribute('required');
                document.getElementById("seekersigndate").removeAttribute('required');
                document.getElementById("seekerisedu").removeAttribute('required');

              }
              else{
              alert(result.code+result.msg);
              }
          },
          error : function(){
              alert("注册失败!");
          },

        });
      };
      //===========根据选择的角色先跳转到对应的控制器去insert(id,phone,pwd)
      function getsignuproleradioval(value){
        signrole=value;
        if(value=="hrsignup"){
        alert("选择HR身份注册");
        //显示全部必填信息
          document.getElementById("hrsignupposclass").classList.remove("hidden");
          document.getElementById("hrsignupcompanyclass").classList.remove("hidden");
          //设置为必填
          document.getElementById("hrsignuppos").setAttribute('required', true);
           document.getElementById("hrsignupcompany").setAttribute('required', true);
          //求职者的隐藏不必填
          document.getElementById("seekersignemailclass").classList.add("hidden");
        document.getElementById("seekerdateclass").classList.add("hidden");
        document.getElementById("seekeriseduclass").classList.add("hidden");
        document.getElementById("seekersigngenderclass").classList.add("hidden");
        document.getElementById("seekersigngender").removeAttribute('required');
        document.getElementById("seekersignemail").removeAttribute('required');
        document.getElementById("seekersigndate").removeAttribute('required');
        document.getElementById("seekerisedu").removeAttribute('required');

        //跳到对应的控制器中操作数据库
         // document.getElementById("signupform").action = "http://localhost:8080/hrsignup";
        }
        else if(value=="employeesignup"){
        alert("选择求职者身份注册");
        //Hr的隐藏不必填
        document.getElementById("hrsignupposclass").classList.add("hidden");
        document.getElementById("hrsignupcompanyclass").classList.add("hidden");
        document.getElementById("hrsignuppos").removeAttribute('required');
        document.getElementById("hrsignupcompany").removeAttribute('required');
        //显示求职者注册必填信息
        document.getElementById("seekersignemailclass").classList.remove("hidden");
        document.getElementById("seekerdateclass").classList.remove("hidden");
        document.getElementById("seekeriseduclass").classList.remove("hidden");
        document.getElementById("seekersigngenderclass").classList.remove("hidden");
        document.getElementById("seekersigngender").setAttribute('required', true);
        document.getElementById("seekersignemail").setAttribute('required', true);
        document.getElementById("seekersigndate").setAttribute('required', true);
        document.getElementById("seekerisedu").setAttribute('required', true);
       // document.getElementById("signupform").action = "http://localhost:8080/employeesignup";
        }
      };

      //===========确认两次密码一致
     function checkpwd() {
       var password = document.getElementById("inputpwd").value;
       var repassword = document.getElementById("confirmpwd").value;
       //判断输入框为空
       if(!password){
        document.getElementById("tishi").innerHTML="<br><font color='red'>请输入密码!</font>";
          document.getElementById("signupbtn").disabled = true;
                    }
       else if(password == repassword) {
          document.getElementById("tishi").innerHTML="<br><font color='green'>两次密码输入一致</font>";
          document.getElementById("signupbtn").disabled = false;
                    }
       else {
          document.getElementById("tishi").innerHTML="<br><font color='red'>两次输入密码不一致!</font>";
          document.getElementById("signupbtn").disabled = true;
            }
     };

    </script>
</body>

</html>
